package com.kimi.bigdata.VideoAnalyzer

import org.apache.spark.sql.hive.HiveContext
import org.apache.spark.{SparkConf, SparkContext}

/**
  * Created by WangChenHan on 2017/3/27.
  */
object VideoAnalyzer {
  def main(array: Array[String]): Unit =
  {
    println("VideoAnalyzer Starting...")
    val conf = new SparkConf()
    conf.setAppName("VideoAnalyzer")

    val sc = new SparkContext(conf)

    val hssc = new HiveContext(sc)

    val videoEvent = hssc.sql("select * from videomovingobjectevent")
    val count =videoEvent.count()
    println("count:" +count)


  }
}
